CSEG8003 Course home Portal
UPES · School of Computer Science
CSEG8003 — Modelling and Simulation · L-T-P-C 2-0-1-3
Unit V
Simulation Results Analysis and Viewing Tools
4 lecture hours · Theory notes · Dr. Mohsin Furkh Dar
CO4 Tables & graphs Multidimensional visualization Interfaces Validation
Where this unit sits

A simulation produces a file of numbers. Nobody makes a decision from a file of numbers. This unit is about the two steps that turn output into a defensible conclusion:

  1. Presentation — tables, graphs and multidimensional visualization (Sections 1–3), delivered through some interface (Section 4).
  2. Validation — the evidence that the results deserve to be believed at all (Section 5).

Section 5 is the most heavily examined topic in this unit, and the one your laboratory Experiment 9 assesses directly.

1. From Raw Output to Reportable Results

1.1 What a simulation actually produces

1.2 The processing pipeline

  1. Collect in a machine-readable format — CSV or Parquet for tables, HDF5/NetCDF for fields, JSON for metadata. Never in a format that only your GUI can read.
  2. Clean and truncate — discard the warm-up period (Unit IV), handle incomplete runs explicitly rather than silently.
  3. Aggregate — means, quantiles, time-weighted averages, and confidence intervals across replications.
  4. Compare — differences between scenarios with intervals, not bare numbers.
  5. Present — the subject of Sections 2–4.
  6. Archive — results with the model version, parameters, seeds and software versions, so the figure can be regenerated a year later.
Definition — Provenance

Provenance is the recorded lineage of a result: which model version, which input data, which parameters, which random seeds, which software and hardware produced this exact figure. A result without provenance cannot be reproduced and, in a professional setting, cannot be defended.

Common mistake

Producing charts by manual clicking in a spreadsheet. Every figure should be regenerated by a script from the archived result file. If a reviewer asks for the same plot with a different confidence level, this should cost one command, not one afternoon — and manual steps are exactly where transcription errors enter.

2. Display Forms I: Tables and Graphs

2.1 Tables

A table is the right display when the reader needs exact values, when there are few numbers, when the quantities have different units, or when the result must be looked up rather than compared visually.

  1. One row per scenario, one column per measure; keep the ordering meaningful (by performance, not alphabetical).
  2. Report estimate ± half-width, or the interval, with the confidence level and the number of replications stated in the caption.
  3. Round to the precision the confidence interval justifies. Writing 4.283719 minutes when the interval is ±0.4 is false precision and loses marks in a report.
  4. Right-align numbers, use a consistent number of decimals, and state units in the header.
  5. Highlight the best value per column, but never colour a table so heavily that it becomes a bad graph.
Table 5.1 — Example of a correctly reported comparison. Mean waiting time, 30 replications, 95% confidence intervals, common random numbers used across designs.
Design Servers Mean wait (min) 95% CI Utilisation
Baseline 2 8.4 [7.9, 8.9] 0.88
Add one server 3 2.1 [1.9, 2.3] 0.59
Faster service (−15%) 2 4.6 [4.2, 5.0] 0.75

2.2 Graphs: choosing the right chart

Table 5.2 — Chart types and the question each answers.
Chart Answers the question Simulation use
Line / time series How does it evolve? Queue length over time; convergence of a running mean; warm-up identification
Bar chart with error bars Which category is larger, and is the difference real? Comparing scenario means with confidence intervals
Histogram / density What is the shape of the distribution? Waiting-time distribution; showing that the mean hides a long tail
Box plot / violin How do several distributions compare? Spread across replications or scenarios
Scatter plot Are two variables related? Input vs output in sensitivity analysis; simulated vs observed in validation
Q–Q plot Do two distributions match? Distribution fitting; comparing model output with field data
Heatmap How does an output vary over two parameters? Two-factor parameter sweeps; spatial fields on a grid
Tornado diagram Which input matters most? Local sensitivity results (Unit IV)
Contour / surface What does the response surface look like? Optimisation landscapes, field solutions
Gantt / timeline When was each resource busy? Verification of schedules and resource contention

2.3 Principles of honest graphics

  1. Show the uncertainty. A mean without an interval is an opinion. Error bars, bands, or all replication traces in light grey behind the mean.
  2. Do not truncate a bar-chart axis at a non-zero value — it exaggerates differences. Line charts of a narrow range may be zoomed, but say so.
  3. Maximise the data-ink ratio (Tufte): delete gridlines, 3-D effects, shadows, and decorative fills. A 3-D pie chart of simulation results is indefensible.
  4. Label directly where possible instead of forcing the reader into a legend.
  5. Use colour meaningfully — sequential palettes for magnitude, diverging for deviation about a reference, categorical for unordered classes. Avoid rainbow scales: they create false boundaries and are not perceptually uniform. Prefer viridis or cividis.
  6. Design for accessibility — about 8% of male readers have a colour vision deficiency; encode with shape or line style as well as colour, and check the figure in greyscale.
  7. Keep the same axes when comparing panels, otherwise the comparison is visual nonsense.
  8. Caption completely: what is plotted, how many replications, what the band means, and which model version produced it.
Common mistake

Plotting a single replication of a stochastic simulation and drawing a conclusion from its wiggles. Every feature of that curve may be noise. Plot the mean across replications with a confidence band, or overlay all replications so the reader can see the spread.

3. Display Forms II: Multidimensional Visualization

Simulation output is rarely two-dimensional: a parameter sweep may have six inputs and four outputs, and a mesh simulation has three space dimensions plus time plus several fields. Multidimensional visualization is the set of techniques for showing more variables than a plane naturally allows.

3.1 Visual channels for extra dimensions

Beyond x and y, a plot can encode variables in colour, size, shape, orientation, texture, opacity, animation over time, and position in small multiples. Ranked by accuracy of human perception (Cleveland & McGill): position > length > angle > area > colour saturation. Put your most important variable on position, never on colour intensity.

3.2 Techniques for many variables

Table 5.3 — Multidimensional visualization techniques.
Technique Idea Good for / limits
Scatterplot matrix (SPLOM) All pairwise scatter plots in a grid Up to ~8 variables; shows pairwise structure only
Small multiples (trellis) Repeat the same plot per level of another factor Excellent and honest; limited by page area
Parallel coordinates Each variable an axis; each run a polyline crossing them Many variables and many runs; clutters without brushing and axis reordering
Bubble chart x, y, size, colour = 4 variables Compact; area is judged poorly, so keep it for secondary variables
Heatmap / matrix Two factors on the axes, output as colour Parameter sweeps and correlation matrices; needs a good colour map
Dimensionality reduction (PCA, t-SNE, UMAP) Project high-dimensional runs into 2-D Finding clusters of similar behaviour; axes are not interpretable, distances can mislead
Glyphs (star plots, Chernoff faces) Each observation drawn as a small multi-attribute icon Small datasets; largely superseded, mention for completeness
Linked views with brushing Selecting in one view highlights the same records in all views The single most effective interactive technique for exploring simulation output

3.3 Scientific (field) visualization

For mesh-based and particle simulations the data is a field over space and time, and a different toolkit applies:

Definition — In-situ visualization

In-situ (co-processing) visualization performs the analysis and rendering inside the running simulation, on the same nodes, so that only images and extracted features are written to disk instead of the full field data. It exists because I/O bandwidth has not kept pace with computation (Unit III): a large run can generate petabytes that could never be stored, let alone re-read.

Tools: ParaView/Catalyst, VisIt/Libsim, Ascent for in-situ and large-field visualization; Matplotlib, Seaborn, Plotly, Bokeh, Altair and D3.js for statistical and web graphics; Tableau and Power BI for dashboards.

Exam tip

For “discuss display forms for simulation results”, organise the answer as tables → standard 2-D charts → multidimensional techniques → scientific field visualization → principles of honest presentation. Give the selection criterion for each (exact values, evolution, distribution, comparison, spatial structure) and name two tools. Adding the data-ink and rainbow-colour-map points shows judgement, not just recall.

4. Interfaces: Terminals, X and MS Windows, and the Web

The syllabus lists these three interface generations because each is still in use, and each is the right answer in different circumstances.

4.1 Terminal / command-line interfaces

4.2 X Window System and native desktop GUIs

4.3 Web interfaces

The modern default for delivering simulation to users, and the target of your laboratory Experiment 10.

  1. Architecture: a browser front end (HTML/CSS/JavaScript, or a framework such as React) talks over HTTP/REST or WebSocket to a back end (Flask/FastAPI/Django, Node) that owns the simulation engine and a job queue; results are stored and returned as JSON or files.
  2. Patterns: submit-and-poll for long runs; WebSocket streaming for live progress and animation; server-side rendering of large images (the in-situ idea again) versus client-side rendering with Plotly, D3 or WebGL/three.js for interactive small data.
  3. Dashboard frameworks that avoid writing JavaScript: Dash, Streamlit, Panel, Bokeh server, Shiny, Voilà — the pragmatic choice for research tools.
  4. Strengths: zero installation, cross-platform, shareable by URL, naturally multi-user and collaborative, easy to place in front of a cluster, and the same interface serves a laptop and a phone.
  5. Challenges: long-running jobs do not fit the request/response model (needs a queue and job IDs); large result transfers; authentication, authorisation and quota control; reproducibility of user-driven sessions; and browser resource limits for very large geometry.
  6. Security duties when a web page can launch computation: validate and bound every parameter server-side, never pass user input to a shell, rate-limit and quota jobs, run the engine in a sandbox or container with resource limits, and authenticate before allowing expensive runs.
Table 5.4 — Choosing an interface for a simulation tool.
Interface Best for Weakness
Terminal / CLI Batch runs, HPC, parameter sweeps, reproducible pipelines No exploration; unfriendly to non-programmers
X / native GUI Model building, animation-based verification, heavy 3-D interaction Installation, licensing, platform lock-in, poor reproducibility
Web Sharing with stakeholders, dashboards, multi-user access, teaching Long-job handling, data transfer, security surface
Notebook (Jupyter) Analysis, teaching, reproducible exploration with narrative Hidden execution order; not a production interface

The mature answer is that these are layers, not rivals: a scriptable engine at the bottom, a documented API in the middle, and any number of interfaces (CLI, notebook, desktop, web) on top. Never bury the simulation logic inside the GUI — that is the design error that makes a tool impossible to batch, to test or to reuse.

5. Validation of Model Results

Definition — Verification, Validation, Accreditation

Verification: determining that the model is implemented correctly — that the computer program is a faithful representation of the conceptual model. Did we build the model right?

Validation: determining that the model is an accurate representation of the real system for the intended purpose. Did we build the right model?

Accreditation: the official certification by a responsible authority that a model is acceptable for a specific application.

Validity is never absolute. A model is valid for a purpose, within a domain, to a stated accuracy. Any answer that claims a model is simply “validated” without those three qualifiers is incomplete.

5.1 Verification techniques

  1. Structured walkthrough of the code and the event logic with a colleague.
  2. Trace analysis — follow a few entities event by event and check by hand that state changes are correct.
  3. Degeneracy and extreme-condition tests — zero arrivals, one entity, infinite service rate, zero capacity. The output must be obviously right (or the model must correctly refuse).
  4. Comparison with analytical results — simulate M/M/1 and check L and W against the Unit IV formulae; this is the single most valuable verification test for a queueing simulator.
  5. Consistency checks and invariants — conservation of entities, mass or energy; Little's law on the measured output; non-negative queues.
  6. Continuity and monotonicity tests — a small change of input should give a small change of output unless a threshold is crossed; more servers must not increase waiting.
  7. Seed and independence checks — the same seed reproduces the run exactly; different seeds give different but statistically consistent runs.
  8. Convergence / mesh refinement for continuous models (Unit I).
  9. Unit and regression tests in the software-engineering sense, run automatically.

5.2 Validation techniques

Naylor and Finger's three-step approach is the classical framing, and Sargent's catalogue is the standard list of techniques; both are worth citing.

(a) Face validity and conceptual validation

(b) Input data validation

Garbage in, garbage out: distributions must be fitted and tested (Unit IV), data sources documented, and the period covered stated. A model can be perfectly implemented and still wrong because the arrival rate came from an unrepresentative week.

(c) Output (operational) validation — the core

  1. Comparison with historical/field data. Run the model under the historical conditions and compare output distributions with observed ones.
  2. Statistical comparison. Use a confidence interval on the difference between simulated and observed means; two-sample t-tests; Kolmogorov–Smirnov or Anderson–Darling to compare whole distributions; time-series comparison via spectral or autocorrelation analysis. Report error metrics:
RMSE = √((1/n)∑(yiŷ i)2),    MAPE = (100/n)∑|(y iŷi)/yi |,    Theil's U
  1. Data splitting. Calibrate on one part of the data, validate on a held-out part. Fitting and validating on the same data proves nothing.
  2. Predictive validation. The strongest evidence: the model predicts an outcome that is then observed.
  3. Event validity. Compare the number and timing of characteristic events (failures, peaks, blockages), not only the means.
  4. Turing test. Show experts mixed real and simulated output records and ask them to identify which is which. If they cannot do better than chance, that is meaningful evidence.
  5. Extreme condition and stress validation. The model must behave plausibly under conditions outside normal operation.
  6. Sensitivity analysis as validation (Unit IV) — the model's response to each factor should agree with the direction and rough magnitude that domain experts expect.
  7. Docking / cross-model validation. Compare against an independent model of the same system, ideally built by a different team or in a different paradigm.
Example — validating a traffic-flow simulation (Experiment 9)
  1. Verification: conservation of vehicles (in − out = change in occupancy); a single vehicle on an empty road travels at free-flow speed; the same seed reproduces the run exactly.
  2. Analytical check: at low density the flow–density relation must follow q = kvfree, matching the fundamental diagram.
  3. Data comparison: simulated hourly flows against loop-detector counts for the same day; report RMSE and MAPE, and plot simulated vs observed with the 45° line.
  4. Distributional check: K–S test on travel-time distributions, not just means.
  5. Held-out validation: calibrate on Monday–Thursday, validate on Friday.
  6. Event validity: does congestion begin at the observed time and location?
  7. Extreme conditions: close a lane — queues must form upstream, not downstream.
  8. Report: intervals, error metrics, the domain of validity (peak-hour weekday urban arterial), and the assumptions that limit it.

5.3 When you cannot validate

Some models have no data to validate against: a system not yet built, a pandemic that has not happened, a far-future scenario. Then you must be explicit about what you can establish:

Common mistake

Treating a good fit to historical data as proof of validity. A model with enough free parameters can fit anything (over-fitting), and a fit to aggregate output does not validate the mechanism: two different mechanisms can produce the same curve. Always validate on held-out data, and validate intermediate quantities as well as the headline output.

5.4 Reporting: the credibility checklist

  1. Purpose and the questions the model was built to answer.
  2. Conceptual model, assumptions and their justification.
  3. Input data sources, fitted distributions and goodness-of-fit evidence.
  4. Verification evidence (tests performed and passed).
  5. Validation evidence with error metrics and the comparison data.
  6. Experimental design: warm-up, run length, replications, seeds.
  7. Results with confidence intervals and the appropriate display forms.
  8. Sensitivity and uncertainty analysis.
  9. Stated domain of validity and known limitations.
  10. Provenance: model version, code repository, parameters and software environment.
Exam tip

“Explain validation of simulation results” is the flagship 10-mark question of this unit. Structure: the three definitions (V, V&A) → the “valid for a purpose, within a domain, to an accuracy” caveat → verification techniques (list six) → validation in three layers: conceptual, input data, operational → the statistical comparison methods with RMSE/MAPE and held-out data → what to do when no data exists → the reporting checklist. A worked example makes it a full-mark answer.

6. Unit Summary

6.1 Key terms

Provenance · warm-up truncation · data-ink ratio · small multiples · parallel coordinates · SPLOM · linked brushing · perceptually uniform colour map · iso-surface · volume rendering · streamline · in-situ visualization · X client–server model · network transparency · message loop · REST / WebSocket · submit-and-poll · verification · validation · accreditation · face validity · event validity · docking · Turing test · RMSE · MAPE · held-out data · domain of validity.

6.2 Practice questions

Short answer (2–3 marks each)

  1. When should a table be used instead of a graph?
  2. Why should a bar-chart axis not be truncated?
  3. What is the data-ink ratio?
  4. What is in-situ visualization and why is it needed?
  5. Explain the client–server model of the X Window System.
  6. Distinguish verification, validation and accreditation.
  7. Define face validity and event validity.

Medium answer (5 marks each)

  1. Describe five chart types and the question each answers, with a simulation example for each.
  2. Describe three techniques for visualising more than three dimensions, with their limitations.
  3. Compare terminal, desktop GUI and web interfaces for a simulation tool under at least four criteria.
  4. List and explain six verification techniques for a discrete-event simulation.
  5. How would you validate a model when no historical data exists?

Long answer (10 marks each)

  1. Discuss display forms for simulation results — tables, graphs and multidimensional visualization — including selection criteria, principles of honest presentation and tools.
  2. Explain the validation of simulation results in full: verification versus validation, conceptual, input and operational validation, statistical comparison techniques, error metrics, and the credibility checklist. Illustrate with one worked example.
  3. Design the complete result-viewing subsystem for a simulation tool: data formats, analysis pipeline, display forms, and a web interface architecture with its security and reproducibility requirements.
  4. “A simulation result without uncertainty and provenance is not a result.” Discuss, with reference to output analysis, presentation practice and professional ethics.

6.3 Further reading

CSEG8003 Modelling and Simulation · Unit V student notes · Dr. Mohsin Furkh Dar · UPES